package com.chengzhi.receive;

import com.chengzhi.channel.OrderChannel;
import com.chengzhi.entity.Order;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

/**
 * @param
 * @author RCZ
 * @description
 * @create 2018-01-20 16:47
 */
@EnableBinding(OrderChannel.class)
public class OrderReceive {

    @StreamListener(OrderChannel.ORDER)
    public void receive(Order order){
        System.out.println(order.getOrderId());
    }
}
